<template>
  <el-card>
    <el-tabs v-model="activeName" class="demo-tabs">
      <el-tab-pane v-if="$checkAuth('systemRole')" label="角色管理" name="1">
        <RoleManage></RoleManage>
      </el-tab-pane>
      <el-tab-pane
        v-if="$checkAuth('systemRolePerm')"
        label="权限管理"
        name="2"
      >
        <PermissionManage></PermissionManage>
      </el-tab-pane>
    </el-tabs>
  </el-card>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import RoleManage from './components/roleManage/roleManage.vue'
import PermissionManage from './components/permissionManage/permissionManage.vue'
import { checkAuth } from '@/utils/methods'

defineOptions({
  name: 'SystemRole'
})

const activeName = ref(checkAuth('systemRole') ? '1' : '2')
</script>

<style lang="scss" scoped></style>
